interface NoticeData {
    notice: string
    createTime: string
}

interface Response {
    success: boolean
    code: number
    data: NoticeData
    message: string
}

const res: Response = {
    success: true,
    code: 10000,
    data: {
        notice: '我是最幸运的',
        createTime: '2025-2-10'
    },
    message: '幸运加倍'
}

// TS泛型工具Partial --> 把原来的类型里面所有属性可选, 生成一个新类型
// TS泛型工具Required --> 把原来的类型里面所有属性必选, 生成一个新类型
type ResponseTwo = Partial<Response>
const res2: ResponseTwo = {}
export { res, res2 }